export function hasMatchingIds(array1: any[], array2: any[]) {
    const idsInArray1 = new Set(array1.map(item => item.id));
    for (const item of array2) {
        if (idsInArray1.has(item.id)) {
            return true;
        }
    }
    return false;
}